﻿@model KnowledgeCommunity.Model.Tribune

@{
    ViewBag.Title = "Details";
}

<div class="path one columns">知识论坛</div>

<div class="columns three-fourths">
    <div class="post">
    
    <div class="postinfo">
        <div class="clear"></div>
        <div class="title">论坛检索</div>
    </div>
    <div class="resume">
        <h3>论坛介绍</h3>
        @(new MvcHtmlString(Model.Content))
        <div class="clear"></div>
    </div>
    </div>

    <div id="comments">
    @foreach (var item_C in (IEnumerable<KnowledgeCommunity.Model.TribuneTopic>)ViewData["appList"])
    {
        <div class="comment">
            <div class="line"></div>
            <div class="image"><img src="@Url.Content("~/Content/images/user_1.png")" alt="user" /></div>
            <div class="commentcontent">
            <div class="date"> <a href="#">Replay</a> @item_C.AddTime.ToShortTimeString() by @item_C.UserName </div>
            <p>@item_C.Content</p>
            </div>
        </div>
    }
    <div class="clear"></div>

    <div class="commentform">
        @using (Html.BeginForm("TopicCreate", "Tribune", FormMethod.Post, new { enctype = "multipart/form-data" }))
        {
            @Html.ValidationSummary(true)
            @Html.HiddenFor(model => model.Id)
            @Html.HiddenFor(model => model.ShapeCode)
            <p>发帖</p>
                <textarea id="message" name="message" ></textarea>
            <br/>
            <input class="button" name="Send" type="submit" value="确定" />
        }
    </div>
    </div>

</div>


<div class="columns four_last">
  <div class="sidebar">
    <div class="title">论坛主题： @Model.Title</div>
    <div class="title">帖子数量： @Model.TopicNumber</div>
    <div class="title">发起者： @Model.Sponsor</div>
    <div class="title">发布时间： @Model.AddTime.ToString("yyyy-mm-dd")</div>
    <ul>
        <li><a href="#">收藏</a></li>
        @{
            if (HttpContext.Current.User.IsInRole("admin") || HttpContext.Current.User.IsInRole("editor"))
            {
                <li><a href="@Url.Action("Edit", "Tribune", new { id = Model.Id })">编辑</a></li> 
                <li><a href="@Url.Action("Delete", "Tribune", new { id = Model.Id })">删除</a></li> 
            }
        }
    </ul> 
    </div>
</div>
<div class="clear"></div>
